<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>添加权限</title>
    <link rel="stylesheet" href="/static/lib/layuiadmin/plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/static/lib/layuiadmin/css/global.css" media="all">
    <link rel="stylesheet" href="/static/lib/layuiadmin/plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/lib/layuiadmin/css/table.css" />
    <style type="text/css">
        .H{color:red;}
        .form-table{width:100%;}
        .form-table td{text-align: left;border:1px solid silver;width:25%;line-height: 2.5em;}
        .form-table td >* {float:left;}
        .layui-input{width:auto;}
    </style>
</head>

<body>
<div class="admin-main">
    <div style="">
        <form class="layui-form" method="post" action="">
            <table class="form-table">
                <tr>
                    <td>
                        <label>关键词</label><input type="text" name="q"  <{if condition="(isset($condition.q))"}>value="<{$condition.q}>"<{/if}> placeholder="请输入搜索关键词" autocomplete="off" class="layui-input">
                    </td>
                    <td>
                        <input type="checkbox" name="queryType" value="2"  <{if condition="(isset($condition.queryType) && $condition.queryType eq 2)"}>checked<{/if}> title="按人气排名">
                    </td>
                    <td>
                        <input type="checkbox" name="freeShipment" value="1"  <{if condition="(isset($condition.freeShipment) && $condition.freeShipment eq 1)"}>checked<{/if}> title="包邮"/>
                    </td>
                    <td>
                        <label>营销计划</label>
                        <div class="layui-input-inline">
                            <select name="yxjh" lay-verify="" >
                                <option value="0" <{if condition="(isset($condition.yxjh) && $condition.yxjh eq 0)"}>selected<{/if}> >不选择</option>
                                <option value="1" <{if condition="(isset($condition.yxjh) && $condition.yxjh eq 1)"}>selected<{/if}> >营销和定向计划</option>
                                <option value="-1" <{if condition="(isset($condition.yxjh) && $condition.yxjh eq -1)"}>selected<{/if}> >不是营销和定向计划</option>
                            </select>
                        </div>
                    </td>

                </tr>
                <tr>
                    <td>
                        <input type="checkbox" name="dpyhq" value="1" <{if condition="(isset($condition.dpyhq) && $condition.dpyhq eq 1)"}>checked<{/if}>  title="店铺优惠券" />
                    </td>
                    <td>
                        <label>排序方法</label>
                        <div class="layui-input-inline">
                            <select name="sortType" lay-verify="" >
                                <option value="0" <{if condition="(isset($condition.sortType) && $condition.sortType eq 0)"}>selected<{/if}> >不选择</option>
                                <option value="1" <{if condition="(isset($condition.sortType) && $condition.sortType eq 1)"}>selected<{/if}> >收入比率从高到低</option>
                                <option value="3" <{if condition="(isset($condition.sortType) && $condition.sortType eq 3)"}>selected<{/if}> >价格从高到低</option>
                                <option value="4" <{if condition="(isset($condition.sortType) && $condition.sortType eq 4)"}>selected<{/if}> >价格从低到高</option>
                                <option value="5" <{if condition="(isset($condition.sortType) && $condition.sortType eq 5)"}>selected<{/if}> >月推广量 从高到低</option>
                                <option value="7" <{if condition="(isset($condition.sortType) && $condition.sortType eq 7)"}>selected<{/if}> >月支出佣金从高到低</option>
                                <option value="9" <{if condition="(isset($condition.sortType) && $condition.sortType eq 9)"}>selected<{/if}> >按销量排序从高到低</option>
                            </select>
                        </div>
                    </td>
                    <td>
                        <label>月销量</label>
                        <input type="number" <{if condition="(isset($condition.startBiz30day))"}>value="<{$condition.startBiz30day}>"<{/if}> name="startBiz30day" placeholder="月销量多少比及以上" class="layui-input"/>
                    </td>
                    <td>
                        <input type="checkbox" name="b2c" value="1" <{if condition="(isset($condition.b2c) && $condition.b2c eq 1)"}>checked<{/if}> title="天猫旗舰店" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <input type="checkbox" name="hPayRate30" value="1" <{if condition="(isset($condition.hPayRate30) && $condition.hPayRate30 eq 1)"}>checked<{/if}> title="月成交转化率高于行业均值" />
                    </td>
                    <td>
                        <label>收入比率</label>
                        <input style="width:80px;" type="number" <{if condition="(isset($condition.startTkRate))"}>value="<{$condition.startTkRate}>"<{/if}>  name="startTkRate" placeholder="数字" class="layui-input"/><span>%</span>
                        <label>到</label>
                        <input style="width:80px;" type="number" <{if condition="(isset($condition.endTkRate))"}>value="<{$condition.endTkRate}>"<{/if}>  name="endTkRate" placeholder="数字" class="layui-input"/><span>%</span>
                    </td>
                    <td>
                        <label>价格</label>
                        <input style="width:80px;" type="number" <{if condition="(isset($condition.startPrice))"}>value="<{$condition.startPrice}>"<{/if}>  name="startPrice" placeholder="数字" class="layui-input" />
                        <label>到</label>
                        <input  style="width:80px;" type="number" <{if condition="(isset($condition.endPrice))"}>value="<{$condition.endPrice}>"<{/if}>  name="endPrice" placeholder="数字" class="layui-input" />
                    </td>
                    <td>
                        <label>库存</label>
                        <input type="number" <{if condition="(isset($condition.startQuantity))"}>value="<{$condition.startQuantity}>"<{/if}>  name="startQuantity" placeholder="库存多少以上" class="layui-input"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label>月付款</label>
                        <input type="number" <{if condition="(isset($condition.startPayUv30))"}>value="<{$condition.startPayUv30}>"<{/if}> name="startPayUv30" placeholder="月付款多少以上" class="layui-input"/>
                    </td>
                    <td>
                        <label>让利</label><input type="number" <{if condition="(isset($condition.startRlRate))"}>value="<{$condition.startRlRate}>"<{/if}> name="startRlRate" placeholder="让利百分之多少以上" class="layui-input" />%
                    </td>
                    <td>
                        <input type="checkbox" value="1" name="hGoodRate" title="好评率高于行业均值" <{if condition="(isset($condition.hGoodRate) && $condition.hGoodRate eq 1)"}>checked<{/if}> class="layui-input"/>
                    </td>
                    <td>
                        <input type="checkbox" value="1" name="jhs" title="聚划算"  <{if condition="(isset($condition.jhs) && $condition.jhs eq 1)"}>checked<{/if}> class="layui-input"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <div class="layui-input-inline">
                            <input type="radio" value="qqg" name="typeTag" title="全球购" <{if condition="(isset($condition.typeTag) && $condition.typeTag eq 'qqg')"}>checked<{/if}> class="layui-input"/>
                            <input type="radio" value="zgzz" name="typeTag" title="中国制造" <{if condition="(isset($condition.typeTag) && $condition.typeTag eq 'zgzz')"}>checked<{/if}>  class="layui-input"/>
                            <input type="radio" value="" name="typeTag" title="不选择" <{if condition="(isset($condition.typeTag) && $condition.typeTag eq '')"}>checked<{/if}>  class="layui-input"/>
                        </div>
                    </td>
                    <td>

                    </td>
                    <td>
                        <label>DSR</label>
                        <div class="layui-input-inline">
                            <select name="startDsr" lay-verify="" >
                                <option value="0" <{if condition="(isset($condition.startDsr) && $condition.startDsr eq 0)"}>selected<{/if}> >不选择</option>
                                <option value="4.5" <{if condition="(isset($condition.startDsr) && $condition.startDsr eq 4.5)"}>selected<{/if}>  >4.5</option>
                                <option value="4.6" <{if condition="(isset($condition.startDsr) && $condition.startDsr eq 4.6)"}>selected<{/if}> >4.6</option>
                                <option value="4.7" <{if condition="(isset($condition.startDsr) && $condition.startDsr eq 4.7)"}>selected<{/if}> >4.7</option>
                                <option value="4.8" <{if condition="(isset($condition.startDsr) && $condition.startDsr eq 4.8)"}>selected<{/if}> >4.8</option>
                                <option value="4.9" <{if condition="(isset($condition.startDsr) && $condition.startDsr eq 4.9)"}>selected<{/if}> >4.9</option>
                                <option value="5.0" <{if condition="(isset($condition.startDsr) && $condition.startDsr eq 5.0)"}>selected<{/if}> >5.0</option>
                            </select>
                        </div>
                    </td>
                    <td>
                        <label>月销量</label><input type="number" <{if condition="(isset($condition.startSpay30))"}>value="<{$condition.startSpay30}>"<{/if}> name="startSpay30" placeholder="月销量多少以上" class="layui-input"/>

                    </td>
                </tr>
                <tr>
                    <td>
                        <input type="checkbox" value="1" name="qtth" title="七天退货" <{if condition="(isset($condition.qtth) && $condition.qtth eq 1)"}>checked<{/if}> class="layui-input"/>
                    </td>
                    <td>
                        <input type="checkbox" value="1" name="lRfdRate" title="退款率低于行业均值" <{if condition="(isset($condition.lRfdRate) && $condition.lRfdRate eq 1)"}>checked<{/if}> class="layui-input"/>
                    </td>
                    <td>
                        <input type="checkbox" value="1" name="hSellerGoodrat" title="好评率高于行业均值" <{if condition="(isset($condition.hSellerGoodrat) && $condition.hSellerGoodrat eq 1)"}>checked<{/if}> class="layui-input"/>
                    </td>
                    <td>
                        <input type="checkbox" value="1" name="hSpayRate30" title="成交率高于行业均值"  <{if condition="(isset($condition.hSpayRate30) && $condition.hSpayRate30 eq 1)"}>checked<{/if}> class="layui-input"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label>图片牛皮鲜程度</label>
                        <div class="layui-input-inline">
                            <select name="npxType" lay-verify="" >
                                <option value="0" <{if condition="(isset($condition.npxType) && $condition.npxType eq 0)"}>selected<{/if}> >不选择</option>
                                <option value="1" <{if condition="(isset($condition.npxType) && $condition.npxType eq 1)"}>selected<{/if}> >无</option>
                                <option value="2" <{if condition="(isset($condition.npxType) && $condition.npxType eq 2)"}>selected<{/if}> >轻微</option>
                            </select>
                        </div>
                    </td>
                    <td>
                        <label>图片综合质量</label>
                        <div class="layui-input-inline">
                            <select name="picQuality" lay-verify="" >
                                <option value="0" <{if condition="(isset($condition.picQuality) && $condition.picQuality eq 0)"}>selected<{/if}> >不选择</option>
                                <option value="1" <{if condition="(isset($condition.picQuality) && $condition.picQuality eq 1)"}>selected<{/if}> >中</option>
                                <option value="2" <{if condition="(isset($condition.picQuality) && $condition.picQuality eq 2)"}>selected<{/if}> >高</option>
                            </select>
                        </div>
                    </td>
                    <td>
                        <label>每页大小</label><input type="number" <{if condition="(isset($condition.perPageSize))"}>value="<{$condition.perPageSize}>"<{/if}> name="perPageSize" placeholder="每页大小" class="layui-input"/>
                    </td>
                    <td>
                        <label>第几页</label><input type="number" <{if condition="(isset($condition.toPage))"}>value="<{$condition.toPage}>"<{/if}> name="toPage" placeholder="第几页" class="layui-input"/>
                    </td>
                </tr>
            </table>




            <div class="layui-form-item">

                    <button lay-filter="add" lay-submit class="layui-btn">提交</button><a href="/admin/post/index" class="layui-btn layui-btn-danger">返回</a>

            </div>
        </form>
    </div>
</div>





<fieldset class="layui-elem-field">
    <legend>产品列表</legend>
    <div class="layui-field-box layui-form">
        <table class="layui-table admin-table">
            <thead>
            <tr>
                <th style="width: 20px;"><input type="checkbox" lay-filter="allselector" lay-skin="primary"></th>
                <th>标题</th>
                <th>图片</th>
                <th>价格</th>
                <th>佣金</th>
                <td>佣金比率</td>
                <th>月销</th>
                <th>店铺</th>
                <th>地址</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody id="content">
            <{volist name="pageList" id="item"}>
            <tr>
                <td><input type="checkbox" lay-skin="primary"></td>
                <td><{$item.title}></td>
                <td><img src="<{$item.pictUrl}>" style="width:50px;height:50px;"/></td>
                <td>￥<{$item.zkPrice}></td>
                <td>￥<{$item.tkCommFee}></td>
                <td><{$item.tkRate}>%</td>
                <td><{$item.biz30day}></td>
                <th><{$item.shopTitle}></th>
                <td><{$item.auctionUrl}></td>
                <td>
                    <a href="javascript:;" data-id=""  data-opt="addToQueue" class="layui-btn layui-btn-mini addToQueue">加入到上传队列</a>
                </td>
            </tr>
            <{/volist}>
            </tbody>
        </table>
    </div>
</fieldset>

<div class="layui-btn layui-btn-success" id="lots">全部加入上传队列</div>


<script type="text/javascript" src="/static/lib/layuiadmin/plugins/layui/layui.js"></script>



<script type="text/javascript">
    layui.use('form', function(){
        var form = layui.form();
    });
    layui.use(["layer","upload"],function(){
        var $ = layui.jquery;
        layui.upload({
            url: '/admin/upload/upload'
            ,success: function(res){
                console.log(res); //上传成功返回值，必须为json格式
                if(1 == res.code){
                    $("#cover-show").attr("src",res.data.src);
                    $("#cover").val(res.data.src);
                }else{
                    layer.msg(res.msg);
                }
            }
        });

        var data = [
            <{volist name="pageList" id="item"}>
            {title:'<{$item.title}>',cover:'<{$item.pictUrl}>',url:'<{$item.auctionUrl}>'},
            <{/volist}>
        ];
        $("#lots").click(function(){
            $.post('/admin/taobao/addToQueueFromSpider',{data:data},function(data){
                console.log(data);
            });
        });
    });

</script>

</body>

</html>